package com.hrt.datasender.web.bdplccontrol;

import java.util.Date;
import com.btcode.db.fieldtype.FieldType;
import com.btcode.orm.model.BaseModel;
import com.btcode.orm.model.Field;
import com.btcode.orm.model.IField;

@SuppressWarnings("unchecked")
public class BdPlcDataSingleModel extends BaseModel {

    private static final long serialVersionUID = 1L;


    public static String tableName = "BD_PLC_DATA_SINGLE";


    public static IField id = new Field(BdPlcDataSingleModel.class,"ID",FieldType.String,true,true,false);

    public static IField plcPointId = new Field(BdPlcDataSingleModel.class,"PLC_POINT_ID",FieldType.String,true,true,true);

    public static IField value = new Field(BdPlcDataSingleModel.class,"VALUE",FieldType.String,false,true,false);

    public static IField createtime = new Field(BdPlcDataSingleModel.class,"CREATETIME",FieldType.DateTime,false,true,false);

    public static IField updatetime = new Field(BdPlcDataSingleModel.class,"UPDATETIME",FieldType.DateTime,false,true,false);

    public static IField createBy = new Field(BdPlcDataSingleModel.class,"CREATE_BY",FieldType.String,false,true,false);

    public static IField updateBy = new Field(BdPlcDataSingleModel.class,"UPDATE_BY",FieldType.String,false,true,false);

    public void setId(String value){
        setFieldValue(BdPlcDataSingleModel.id.getFieldName(), value);
    }

    public String getId(){
        Object value = getFieldValue(BdPlcDataSingleModel.id.getFieldName());
        return getValueConver().converToString(value);
    }

    public void setPlcPointId(String value){
        setFieldValue(BdPlcDataSingleModel.plcPointId.getFieldName(), value);
    }

    public String getPlcPointId(){
        Object value = getFieldValue(BdPlcDataSingleModel.plcPointId.getFieldName());
        return getValueConver().converToString(value);
    }

    public void setValue(String value){
        setFieldValue(BdPlcDataSingleModel.value.getFieldName(), value);
    }

    public String getValue(){
        Object value = getFieldValue(BdPlcDataSingleModel.value.getFieldName());
        return getValueConver().converToString(value);
    }

    public void setCreatetime(Date value){
        setFieldValue(BdPlcDataSingleModel.createtime.getFieldName(), value);
    }

    public Date getCreatetime(){
        Object value = getFieldValue(BdPlcDataSingleModel.createtime.getFieldName());
        return getValueConver().converToDate(value);
    }

    public void setUpdatetime(Date value){
        setFieldValue(BdPlcDataSingleModel.updatetime.getFieldName(), value);
    }

    public Date getUpdatetime(){
        Object value = getFieldValue(BdPlcDataSingleModel.updatetime.getFieldName());
        return getValueConver().converToDate(value);
    }

    public void setCreateBy(String value){
        setFieldValue(BdPlcDataSingleModel.createBy.getFieldName(), value);
    }

    public String getCreateBy(){
        Object value = getFieldValue(BdPlcDataSingleModel.createBy.getFieldName());
        return getValueConver().converToString(value);
    }

    public void setUpdateBy(String value){
        setFieldValue(BdPlcDataSingleModel.updateBy.getFieldName(), value);
    }

    public String getUpdateBy(){
        Object value = getFieldValue(BdPlcDataSingleModel.updateBy.getFieldName());
        return getValueConver().converToString(value);
    }


    public String getTableName() {
        return tableName;
    }


    public boolean isNeedCache() {
        return false;
    }

}